<template>
  <div id="app">
    <header class="head">
      <a class="back tl" href="javascript:history.back(-1)">
        <i class="el-icon-arrow-left"></i>
      </a>
      <a href="javascript:;" class="tc">
        <small class="font_18 co_f">车辆信息详情</small>
      </a>
    </header>
    <main>
      <section class="detail_status_info">
        <header><span>基本信息</span></header>
        <p><label>车辆名称</label><span>{{listData.fld_3}}</span></p>
        <p><label>部门</label><span>{{listData.fld_22}}</span></p>
        <p><label>规格型号：</label><span>{{listData.fld_4}}</span></p>
        <p><label>车牌号：</label><span>{{listData.fld_7}}</span> </p>
        <p><label>车辆状态</label><span>{{listData.fld_11}}</span> </p>
        <p><label>数量</label><span>{{listData.fld_17}}</span> </p>
        <p><label>购置日期 </label><span>{{listData.fld_date}}</span> </p>
        <p><label>折旧年限</label><span>{{listData.fld_25}}</span> </p>
      </section>
    </main>
  </div>
</template>

<script>
  import {
    ViewDetail
  } from '../../../api/api';
  export default {
    data() {
      return {
        listData: {},
      };
    },
    methods: {
      getData() {
        let options = {
          params: {
            unid: this.$route.query.unid
          }
        }
        //调取接口
        ViewDetail(options).then((res) => {
          this.listData = res.fields
          this.items = (this.listData.fld_12.split("|")[1]).split(".")[0]
        })
      }
    },
    mounted() {
      this.getData();
    }
  }
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->

<style lang="scss" scoped>
  
</style>
